@tool
class_name Guard_ControllerActionState
extends Guard

@export var key_action:GameEnum.KeyAction
@export var key_action_states:Array[GameEnum.KeyActionState]

func is_satisfied(transition:Transition,state:State) -> bool:
	var cur_key_action_state = state.chart.get_expression_property("Controller_" + Utils.get_enum_key_by_value(GameEnum.KeyAction,key_action), null)
	return cur_key_action_state != null and cur_key_action_state in key_action_states

func _init() -> void:
	if Engine.is_editor_hint():
		resource_local_to_scene = true
